//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS ApplicationInsights service.
///
/// Amazon CloudWatch Application Insights Amazon CloudWatch Application Insights is a service that helps you detect common problems with your applications. It enables you to pinpoint the source of issues in your applications (built with technologies such as Microsoft IIS, .NET, and Microsoft SQL Server), by providing key insights into detected problems. After you onboard your application, CloudWatch Application Insights identifies, recommends, and sets up metrics and logs. It continuously analyzes and correlates your metrics and logs for unusual behavior to surface actionable problems with your application. For example, if your application is slow and unresponsive and leading to HTTP 500 errors in your Application Load Balancer (ALB), Application Insights informs you that a memory pressure problem with your SQL Server database is occurring. It bases this analysis on impactful metrics and log errors.
public struct ApplicationInsights: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the ApplicationInsights client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "EC2WindowsBarleyService",
            serviceName: "ApplicationInsights",
            serviceIdentifier: "applicationinsights",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2018-11-25",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: ApplicationInsightsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "applicationinsights.af-south-1.api.aws",
            "ap-east-1": "applicationinsights.ap-east-1.api.aws",
            "ap-northeast-1": "applicationinsights.ap-northeast-1.api.aws",
            "ap-northeast-2": "applicationinsights.ap-northeast-2.api.aws",
            "ap-northeast-3": "applicationinsights.ap-northeast-3.api.aws",
            "ap-south-1": "applicationinsights.ap-south-1.api.aws",
            "ap-south-2": "applicationinsights.ap-south-2.api.aws",
            "ap-southeast-1": "applicationinsights.ap-southeast-1.api.aws",
            "ap-southeast-2": "applicationinsights.ap-southeast-2.api.aws",
            "ap-southeast-3": "applicationinsights.ap-southeast-3.api.aws",
            "ap-southeast-4": "applicationinsights.ap-southeast-4.api.aws",
            "ca-central-1": "applicationinsights.ca-central-1.api.aws",
            "ca-west-1": "applicationinsights.ca-west-1.api.aws",
            "cn-north-1": "applicationinsights.cn-north-1.api.amazonwebservices.com.cn",
            "cn-northwest-1": "applicationinsights.cn-northwest-1.api.amazonwebservices.com.cn",
            "eu-central-1": "applicationinsights.eu-central-1.api.aws",
            "eu-central-2": "applicationinsights.eu-central-2.api.aws",
            "eu-north-1": "applicationinsights.eu-north-1.api.aws",
            "eu-south-1": "applicationinsights.eu-south-1.api.aws",
            "eu-south-2": "applicationinsights.eu-south-2.api.aws",
            "eu-west-1": "applicationinsights.eu-west-1.api.aws",
            "eu-west-2": "applicationinsights.eu-west-2.api.aws",
            "eu-west-3": "applicationinsights.eu-west-3.api.aws",
            "il-central-1": "applicationinsights.il-central-1.api.aws",
            "me-central-1": "applicationinsights.me-central-1.api.aws",
            "me-south-1": "applicationinsights.me-south-1.api.aws",
            "sa-east-1": "applicationinsights.sa-east-1.api.aws",
            "us-east-1": "applicationinsights.us-east-1.api.aws",
            "us-east-2": "applicationinsights.us-east-2.api.aws",
            "us-gov-east-1": "applicationinsights.us-gov-east-1.api.aws",
            "us-gov-west-1": "applicationinsights.us-gov-west-1.api.aws",
            "us-west-1": "applicationinsights.us-west-1.api.aws",
            "us-west-2": "applicationinsights.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "ca-central-1": "applicationinsights-fips.ca-central-1.api.aws",
            "ca-west-1": "applicationinsights-fips.ca-west-1.api.aws",
            "us-east-1": "applicationinsights-fips.us-east-1.api.aws",
            "us-east-2": "applicationinsights-fips.us-east-2.api.aws",
            "us-gov-east-1": "applicationinsights-fips.us-gov-east-1.api.aws",
            "us-gov-west-1": "applicationinsights-fips.us-gov-west-1.api.aws",
            "us-west-1": "applicationinsights-fips.us-west-1.api.aws",
            "us-west-2": "applicationinsights-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "ca-central-1": "applicationinsights-fips.ca-central-1.amazonaws.com",
            "ca-west-1": "applicationinsights-fips.ca-west-1.amazonaws.com",
            "us-east-1": "applicationinsights-fips.us-east-1.amazonaws.com",
            "us-east-2": "applicationinsights-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "applicationinsights-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "applicationinsights-fips.us-gov-west-1.amazonaws.com",
            "us-west-1": "applicationinsights-fips.us-west-1.amazonaws.com",
            "us-west-2": "applicationinsights-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Adds a workload to a component. Each component can have at most five workloads.
    @Sendable
    @inlinable
    public func addWorkload(_ input: AddWorkloadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddWorkloadResponse {
        try await self.client.execute(
            operation: "AddWorkload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a workload to a component. Each component can have at most five workloads.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - workloadConfiguration: The configuration settings of the workload. The value is the escaped JSON of the configuration.
    ///   - logger: Logger use during operation
    @inlinable
    public func addWorkload(
        componentName: String,
        resourceGroupName: String,
        workloadConfiguration: WorkloadConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddWorkloadResponse {
        let input = AddWorkloadRequest(
            componentName: componentName, 
            resourceGroupName: resourceGroupName, 
            workloadConfiguration: workloadConfiguration
        )
        return try await self.addWorkload(input, logger: logger)
    }

    /// Adds an application that is created from a resource group.
    @Sendable
    @inlinable
    public func createApplication(_ input: CreateApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateApplicationResponse {
        try await self.client.execute(
            operation: "CreateApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an application that is created from a resource group.
    ///
    /// Parameters:
    ///   - attachMissingPermission: If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.
    ///   - autoConfigEnabled:  Indicates whether Application Insights automatically configures unmonitored resources in the resource group.
    ///   - autoCreate:  Configures all of the resources in the resource group by applying the recommended configurations.
    ///   - cweMonitorEnabled:  Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.
    ///   - groupingType: Application Insights can create applications based on a resource group or on an account. To create an account-based application using all of the resources in the account, set this parameter to ACCOUNT_BASED.
    ///   - opsCenterEnabled:  When set to true, creates opsItems for any problems detected on an application.
    ///   - opsItemSNSTopicArn:  The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.
    ///   - resourceGroupName: The name of the resource group.
    ///   - snsNotificationArn:  The SNS notification topic ARN.
    ///   - tags: List of tags to add to the application. tag key (Key) and an associated tag value (Value). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func createApplication(
        attachMissingPermission: Bool? = nil,
        autoConfigEnabled: Bool? = nil,
        autoCreate: Bool? = nil,
        cweMonitorEnabled: Bool? = nil,
        groupingType: GroupingType? = nil,
        opsCenterEnabled: Bool? = nil,
        opsItemSNSTopicArn: String? = nil,
        resourceGroupName: String? = nil,
        snsNotificationArn: String? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateApplicationResponse {
        let input = CreateApplicationRequest(
            attachMissingPermission: attachMissingPermission, 
            autoConfigEnabled: autoConfigEnabled, 
            autoCreate: autoCreate, 
            cweMonitorEnabled: cweMonitorEnabled, 
            groupingType: groupingType, 
            opsCenterEnabled: opsCenterEnabled, 
            opsItemSNSTopicArn: opsItemSNSTopicArn, 
            resourceGroupName: resourceGroupName, 
            snsNotificationArn: snsNotificationArn, 
            tags: tags
        )
        return try await self.createApplication(input, logger: logger)
    }

    /// Creates a custom component by grouping similar standalone instances to monitor.
    @Sendable
    @inlinable
    public func createComponent(_ input: CreateComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateComponentResponse {
        try await self.client.execute(
            operation: "CreateComponent", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a custom component by grouping similar standalone instances to monitor.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - resourceList: The list of resource ARNs that belong to the component.
    ///   - logger: Logger use during operation
    @inlinable
    public func createComponent(
        componentName: String,
        resourceGroupName: String,
        resourceList: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateComponentResponse {
        let input = CreateComponentRequest(
            componentName: componentName, 
            resourceGroupName: resourceGroupName, 
            resourceList: resourceList
        )
        return try await self.createComponent(input, logger: logger)
    }

    /// Adds an log pattern to a LogPatternSet.
    @Sendable
    @inlinable
    public func createLogPattern(_ input: CreateLogPatternRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateLogPatternResponse {
        try await self.client.execute(
            operation: "CreateLogPattern", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds an log pattern to a LogPatternSet.
    ///
    /// Parameters:
    ///   - pattern: The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.
    ///   - patternName: The name of the log pattern.
    ///   - patternSetName: The name of the log pattern set.
    ///   - rank: Rank of the log pattern. Must be a value between 1 and 1,000,000. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank 1 will be the first to get matched to a log line. A pattern of rank 1,000,000 will be last to get matched. When you configure custom log patterns from the console, a Low severity pattern translates to a 750,000 rank. A Medium severity pattern translates to a 500,000 rank. And a High severity pattern translates to a 250,000 rank. Rank values less than 1 or greater than 1,000,000 are reserved for Amazon Web Services provided patterns.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func createLogPattern(
        pattern: String,
        patternName: String,
        patternSetName: String,
        rank: Int = 0,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateLogPatternResponse {
        let input = CreateLogPatternRequest(
            pattern: pattern, 
            patternName: patternName, 
            patternSetName: patternSetName, 
            rank: rank, 
            resourceGroupName: resourceGroupName
        )
        return try await self.createLogPattern(input, logger: logger)
    }

    /// Removes the specified application from monitoring. Does not delete the application.
    @Sendable
    @inlinable
    public func deleteApplication(_ input: DeleteApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteApplicationResponse {
        try await self.client.execute(
            operation: "DeleteApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified application from monitoring. Does not delete the application.
    ///
    /// Parameters:
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteApplication(
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteApplicationResponse {
        let input = DeleteApplicationRequest(
            resourceGroupName: resourceGroupName
        )
        return try await self.deleteApplication(input, logger: logger)
    }

    /// Ungroups a custom component. When you ungroup custom components, all applicable monitors that are set up for the component are removed and the instances revert to their standalone status.
    @Sendable
    @inlinable
    public func deleteComponent(_ input: DeleteComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteComponentResponse {
        try await self.client.execute(
            operation: "DeleteComponent", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Ungroups a custom component. When you ungroup custom components, all applicable monitors that are set up for the component are removed and the instances revert to their standalone status.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteComponent(
        componentName: String,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteComponentResponse {
        let input = DeleteComponentRequest(
            componentName: componentName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.deleteComponent(input, logger: logger)
    }

    /// Removes the specified log pattern from a LogPatternSet.
    @Sendable
    @inlinable
    public func deleteLogPattern(_ input: DeleteLogPatternRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteLogPatternResponse {
        try await self.client.execute(
            operation: "DeleteLogPattern", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified log pattern from a LogPatternSet.
    ///
    /// Parameters:
    ///   - patternName: The name of the log pattern.
    ///   - patternSetName: The name of the log pattern set.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteLogPattern(
        patternName: String,
        patternSetName: String,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteLogPatternResponse {
        let input = DeleteLogPatternRequest(
            patternName: patternName, 
            patternSetName: patternSetName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.deleteLogPattern(input, logger: logger)
    }

    /// Describes the application.
    @Sendable
    @inlinable
    public func describeApplication(_ input: DescribeApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeApplicationResponse {
        try await self.client.execute(
            operation: "DescribeApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes the application.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeApplication(
        accountId: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeApplicationResponse {
        let input = DescribeApplicationRequest(
            accountId: accountId, 
            resourceGroupName: resourceGroupName
        )
        return try await self.describeApplication(input, logger: logger)
    }

    /// Describes a component and lists the resources that are grouped together in a component.
    @Sendable
    @inlinable
    public func describeComponent(_ input: DescribeComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeComponentResponse {
        try await self.client.execute(
            operation: "DescribeComponent", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a component and lists the resources that are grouped together in a component.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeComponent(
        accountId: String? = nil,
        componentName: String,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeComponentResponse {
        let input = DescribeComponentRequest(
            accountId: accountId, 
            componentName: componentName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.describeComponent(input, logger: logger)
    }

    /// Describes the monitoring configuration of the component.
    @Sendable
    @inlinable
    public func describeComponentConfiguration(_ input: DescribeComponentConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeComponentConfigurationResponse {
        try await self.client.execute(
            operation: "DescribeComponentConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes the monitoring configuration of the component.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeComponentConfiguration(
        accountId: String? = nil,
        componentName: String,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeComponentConfigurationResponse {
        let input = DescribeComponentConfigurationRequest(
            accountId: accountId, 
            componentName: componentName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.describeComponentConfiguration(input, logger: logger)
    }

    /// Describes the recommended monitoring configuration of the component.
    @Sendable
    @inlinable
    public func describeComponentConfigurationRecommendation(_ input: DescribeComponentConfigurationRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeComponentConfigurationRecommendationResponse {
        try await self.client.execute(
            operation: "DescribeComponentConfigurationRecommendation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes the recommended monitoring configuration of the component.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - recommendationType: The recommended configuration type.
    ///   - resourceGroupName: The name of the resource group.
    ///   - tier: The tier of the application component.
    ///   - workloadName: The name of the workload. The name of the workload is required when the tier of the application component is  SAP_ASE_SINGLE_NODE or SAP_ASE_HIGH_AVAILABILITY.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeComponentConfigurationRecommendation(
        componentName: String,
        recommendationType: RecommendationType? = nil,
        resourceGroupName: String,
        tier: Tier,
        workloadName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeComponentConfigurationRecommendationResponse {
        let input = DescribeComponentConfigurationRecommendationRequest(
            componentName: componentName, 
            recommendationType: recommendationType, 
            resourceGroupName: resourceGroupName, 
            tier: tier, 
            workloadName: workloadName
        )
        return try await self.describeComponentConfigurationRecommendation(input, logger: logger)
    }

    /// Describe a specific log pattern from a LogPatternSet.
    @Sendable
    @inlinable
    public func describeLogPattern(_ input: DescribeLogPatternRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeLogPatternResponse {
        try await self.client.execute(
            operation: "DescribeLogPattern", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describe a specific log pattern from a LogPatternSet.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - patternName: The name of the log pattern.
    ///   - patternSetName: The name of the log pattern set.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeLogPattern(
        accountId: String? = nil,
        patternName: String,
        patternSetName: String,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeLogPatternResponse {
        let input = DescribeLogPatternRequest(
            accountId: accountId, 
            patternName: patternName, 
            patternSetName: patternSetName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.describeLogPattern(input, logger: logger)
    }

    /// Describes an anomaly or error with the application.
    @Sendable
    @inlinable
    public func describeObservation(_ input: DescribeObservationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeObservationResponse {
        try await self.client.execute(
            operation: "DescribeObservation", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes an anomaly or error with the application.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - observationId: The ID of the observation.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeObservation(
        accountId: String? = nil,
        observationId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeObservationResponse {
        let input = DescribeObservationRequest(
            accountId: accountId, 
            observationId: observationId
        )
        return try await self.describeObservation(input, logger: logger)
    }

    /// Describes an application problem.
    @Sendable
    @inlinable
    public func describeProblem(_ input: DescribeProblemRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeProblemResponse {
        try await self.client.execute(
            operation: "DescribeProblem", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes an application problem.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the owner of the resource group affected by the problem.
    ///   - problemId: The ID of the problem.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeProblem(
        accountId: String? = nil,
        problemId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeProblemResponse {
        let input = DescribeProblemRequest(
            accountId: accountId, 
            problemId: problemId
        )
        return try await self.describeProblem(input, logger: logger)
    }

    /// Describes the anomalies or errors associated with the problem.
    @Sendable
    @inlinable
    public func describeProblemObservations(_ input: DescribeProblemObservationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeProblemObservationsResponse {
        try await self.client.execute(
            operation: "DescribeProblemObservations", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes the anomalies or errors associated with the problem.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - problemId: The ID of the problem.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeProblemObservations(
        accountId: String? = nil,
        problemId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeProblemObservationsResponse {
        let input = DescribeProblemObservationsRequest(
            accountId: accountId, 
            problemId: problemId
        )
        return try await self.describeProblemObservations(input, logger: logger)
    }

    /// Describes a workload and its configuration.
    @Sendable
    @inlinable
    public func describeWorkload(_ input: DescribeWorkloadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeWorkloadResponse {
        try await self.client.execute(
            operation: "DescribeWorkload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a workload and its configuration.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the workload owner.
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - workloadId: The ID of the workload.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeWorkload(
        accountId: String? = nil,
        componentName: String,
        resourceGroupName: String,
        workloadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeWorkloadResponse {
        let input = DescribeWorkloadRequest(
            accountId: accountId, 
            componentName: componentName, 
            resourceGroupName: resourceGroupName, 
            workloadId: workloadId
        )
        return try await self.describeWorkload(input, logger: logger)
    }

    /// Lists the IDs of the applications that you are monitoring.
    @Sendable
    @inlinable
    public func listApplications(_ input: ListApplicationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationsResponse {
        try await self.client.execute(
            operation: "ListApplications", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the IDs of the applications that you are monitoring.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplications(
        accountId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationsResponse {
        let input = ListApplicationsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listApplications(input, logger: logger)
    }

    /// Lists the auto-grouped, standalone, and custom components of the application.
    @Sendable
    @inlinable
    public func listComponents(_ input: ListComponentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListComponentsResponse {
        try await self.client.execute(
            operation: "ListComponents", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the auto-grouped, standalone, and custom components of the application.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listComponents(
        accountId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListComponentsResponse {
        let input = ListComponentsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            resourceGroupName: resourceGroupName
        )
        return try await self.listComponents(input, logger: logger)
    }

    ///  Lists the INFO, WARN, and ERROR events for periodic configuration updates performed by Application Insights. Examples of events represented are:    INFO: creating a new alarm or updating an alarm threshold.   WARN: alarm not created due to insufficient data points used to predict thresholds.   ERROR: alarm not created due to permission errors or exceeding quotas.
    @Sendable
    @inlinable
    public func listConfigurationHistory(_ input: ListConfigurationHistoryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListConfigurationHistoryResponse {
        try await self.client.execute(
            operation: "ListConfigurationHistory", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists the INFO, WARN, and ERROR events for periodic configuration updates performed by Application Insights. Examples of events represented are:    INFO: creating a new alarm or updating an alarm threshold.   WARN: alarm not created due to insufficient data points used to predict thresholds.   ERROR: alarm not created due to permission errors or exceeding quotas.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - endTime: The end time of the event.
    ///   - eventStatus: The status of the configuration update event. Possible values include INFO, WARN, and ERROR.
    ///   - maxResults:  The maximum number of results returned by ListConfigurationHistory in paginated output. When this parameter is used, ListConfigurationHistory returns only MaxResults in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another ListConfigurationHistory request with the returned NextToken value. If this parameter is not used, then ListConfigurationHistory returns all results.
    ///   - nextToken: The NextToken value returned from a previous paginated ListConfigurationHistory request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
    ///   - resourceGroupName: Resource group to which the application belongs.
    ///   - startTime: The start time of the event.
    ///   - logger: Logger use during operation
    @inlinable
    public func listConfigurationHistory(
        accountId: String? = nil,
        endTime: Date? = nil,
        eventStatus: ConfigurationEventStatus? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        resourceGroupName: String? = nil,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListConfigurationHistoryResponse {
        let input = ListConfigurationHistoryRequest(
            accountId: accountId, 
            endTime: endTime, 
            eventStatus: eventStatus, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            resourceGroupName: resourceGroupName, 
            startTime: startTime
        )
        return try await self.listConfigurationHistory(input, logger: logger)
    }

    /// Lists the log pattern sets in the specific application.
    @Sendable
    @inlinable
    public func listLogPatternSets(_ input: ListLogPatternSetsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListLogPatternSetsResponse {
        try await self.client.execute(
            operation: "ListLogPatternSets", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the log pattern sets in the specific application.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listLogPatternSets(
        accountId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListLogPatternSetsResponse {
        let input = ListLogPatternSetsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            resourceGroupName: resourceGroupName
        )
        return try await self.listLogPatternSets(input, logger: logger)
    }

    /// Lists the log patterns in the specific log LogPatternSet.
    @Sendable
    @inlinable
    public func listLogPatterns(_ input: ListLogPatternsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListLogPatternsResponse {
        try await self.client.execute(
            operation: "ListLogPatterns", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the log patterns in the specific log LogPatternSet.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - patternSetName: The name of the log pattern set.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listLogPatterns(
        accountId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        patternSetName: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListLogPatternsResponse {
        let input = ListLogPatternsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            patternSetName: patternSetName, 
            resourceGroupName: resourceGroupName
        )
        return try await self.listLogPatterns(input, logger: logger)
    }

    /// Lists the problems with your application.
    @Sendable
    @inlinable
    public func listProblems(_ input: ListProblemsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProblemsResponse {
        try await self.client.execute(
            operation: "ListProblems", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the problems with your application.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - componentName:  The name of the component.
    ///   - endTime: The time when the problem ended, in epoch seconds. If not specified, problems within the past seven days are returned.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - resourceGroupName: The name of the resource group.
    ///   - startTime: The time when the problem was detected, in epoch seconds. If you don't specify a time frame for the request, problems within the past seven days are returned.
    ///   - visibility: Specifies whether or not you can view the problem. If not specified, visible and ignored problems are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProblems(
        accountId: String? = nil,
        componentName: String? = nil,
        endTime: Date? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        resourceGroupName: String? = nil,
        startTime: Date? = nil,
        visibility: Visibility? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProblemsResponse {
        let input = ListProblemsRequest(
            accountId: accountId, 
            componentName: componentName, 
            endTime: endTime, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            resourceGroupName: resourceGroupName, 
            startTime: startTime, 
            visibility: visibility
        )
        return try await self.listProblems(input, logger: logger)
    }

    /// Retrieve a list of the tags (keys and values) that are associated with a specified application. A tag is a label that you optionally define and associate with an application. Each tag consists of a required tag key and an optional associated tag value. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieve a list of the tags (keys and values) that are associated with a specified application. A tag is a label that you optionally define and associate with an application. Each tag consists of a required tag key and an optional associated tag value. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the application that you want to retrieve tag information for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Lists the workloads that are configured on a given component.
    @Sendable
    @inlinable
    public func listWorkloads(_ input: ListWorkloadsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListWorkloadsResponse {
        try await self.client.execute(
            operation: "ListWorkloads", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the workloads that are configured on a given component.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID of the owner of the workload.
    ///   - componentName: The name of the component.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - nextToken: The token to request the next page of results.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listWorkloads(
        accountId: String? = nil,
        componentName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListWorkloadsResponse {
        let input = ListWorkloadsRequest(
            accountId: accountId, 
            componentName: componentName, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            resourceGroupName: resourceGroupName
        )
        return try await self.listWorkloads(input, logger: logger)
    }

    /// Remove workload from a component.
    @Sendable
    @inlinable
    public func removeWorkload(_ input: RemoveWorkloadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RemoveWorkloadResponse {
        try await self.client.execute(
            operation: "RemoveWorkload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove workload from a component.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - workloadId: The ID of the workload.
    ///   - logger: Logger use during operation
    @inlinable
    public func removeWorkload(
        componentName: String,
        resourceGroupName: String,
        workloadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RemoveWorkloadResponse {
        let input = RemoveWorkloadRequest(
            componentName: componentName, 
            resourceGroupName: resourceGroupName, 
            workloadId: workloadId
        )
        return try await self.removeWorkload(input, logger: logger)
    }

    /// Add one or more tags (keys and values) to a specified application. A tag is a label that you optionally define and associate with an application. Tags can help you categorize and manage application in different ways, such as by purpose, owner, environment, or other criteria.  Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add one or more tags (keys and values) to a specified application. A tag is a label that you optionally define and associate with an application. Tags can help you categorize and manage application in different ways, such as by purpose, owner, environment, or other criteria.  Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the application that you want to add one or more tags to.
    ///   - tags: A list of tags that to add to the application. A tag consists of a required tag key (Key) and an associated tag value (Value). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Remove one or more tags (keys and values) from a specified application.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove one or more tags (keys and values) from a specified application.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name (ARN) of the application that you want to remove one or more tags from.
    ///   - tagKeys: The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value. To remove more than one tag from the application, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates the application.
    @Sendable
    @inlinable
    public func updateApplication(_ input: UpdateApplicationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateApplicationResponse {
        try await self.client.execute(
            operation: "UpdateApplication", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the application.
    ///
    /// Parameters:
    ///   - attachMissingPermission: If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.
    ///   - autoConfigEnabled:  Turns auto-configuration on or off.
    ///   - cweMonitorEnabled:  Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.
    ///   - opsCenterEnabled:  When set to true, creates opsItems for any problems detected on an application.
    ///   - opsItemSNSTopicArn:  The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.
    ///   - removeSNSTopic:  Disassociates the SNS topic from the opsItem created for detected problems.
    ///   - resourceGroupName: The name of the resource group.
    ///   - snsNotificationArn:  The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateApplication(
        attachMissingPermission: Bool? = nil,
        autoConfigEnabled: Bool? = nil,
        cweMonitorEnabled: Bool? = nil,
        opsCenterEnabled: Bool? = nil,
        opsItemSNSTopicArn: String? = nil,
        removeSNSTopic: Bool? = nil,
        resourceGroupName: String,
        snsNotificationArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateApplicationResponse {
        let input = UpdateApplicationRequest(
            attachMissingPermission: attachMissingPermission, 
            autoConfigEnabled: autoConfigEnabled, 
            cweMonitorEnabled: cweMonitorEnabled, 
            opsCenterEnabled: opsCenterEnabled, 
            opsItemSNSTopicArn: opsItemSNSTopicArn, 
            removeSNSTopic: removeSNSTopic, 
            resourceGroupName: resourceGroupName, 
            snsNotificationArn: snsNotificationArn
        )
        return try await self.updateApplication(input, logger: logger)
    }

    /// Updates the custom component name and/or the list of resources that make up the component.
    @Sendable
    @inlinable
    public func updateComponent(_ input: UpdateComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateComponentResponse {
        try await self.client.execute(
            operation: "UpdateComponent", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the custom component name and/or the list of resources that make up the component.
    ///
    /// Parameters:
    ///   - componentName: The name of the component.
    ///   - newComponentName: The new name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - resourceList: The list of resource ARNs that belong to the component.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateComponent(
        componentName: String,
        newComponentName: String? = nil,
        resourceGroupName: String,
        resourceList: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateComponentResponse {
        let input = UpdateComponentRequest(
            componentName: componentName, 
            newComponentName: newComponentName, 
            resourceGroupName: resourceGroupName, 
            resourceList: resourceList
        )
        return try await self.updateComponent(input, logger: logger)
    }

    /// Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by DescribeComponentConfigurationRecommendation.
    @Sendable
    @inlinable
    public func updateComponentConfiguration(_ input: UpdateComponentConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateComponentConfigurationResponse {
        try await self.client.execute(
            operation: "UpdateComponentConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by DescribeComponentConfigurationRecommendation.
    ///
    /// Parameters:
    ///   - autoConfigEnabled:  Automatically configures the component by applying the recommended configurations.
    ///   - componentConfiguration: The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see Working with JSON. You can send a request to DescribeComponentConfigurationRecommendation to see the recommended configuration for a component. For the complete format of the component configuration file, see Component Configuration.
    ///   - componentName: The name of the component.
    ///   - monitor: Indicates whether the application component is monitored.
    ///   - resourceGroupName: The name of the resource group.
    ///   - tier: The tier of the application component.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateComponentConfiguration(
        autoConfigEnabled: Bool? = nil,
        componentConfiguration: String? = nil,
        componentName: String,
        monitor: Bool? = nil,
        resourceGroupName: String,
        tier: Tier? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateComponentConfigurationResponse {
        let input = UpdateComponentConfigurationRequest(
            autoConfigEnabled: autoConfigEnabled, 
            componentConfiguration: componentConfiguration, 
            componentName: componentName, 
            monitor: monitor, 
            resourceGroupName: resourceGroupName, 
            tier: tier
        )
        return try await self.updateComponentConfiguration(input, logger: logger)
    }

    /// Adds a log pattern to a LogPatternSet.
    @Sendable
    @inlinable
    public func updateLogPattern(_ input: UpdateLogPatternRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateLogPatternResponse {
        try await self.client.execute(
            operation: "UpdateLogPattern", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a log pattern to a LogPatternSet.
    ///
    /// Parameters:
    ///   - pattern: The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.
    ///   - patternName: The name of the log pattern.
    ///   - patternSetName: The name of the log pattern set.
    ///   - rank: Rank of the log pattern. Must be a value between 1 and 1,000,000. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank 1 will be the first to get matched to a log line. A pattern of rank 1,000,000 will be last to get matched. When you configure custom log patterns from the console, a Low severity pattern translates to a 750,000 rank. A Medium severity pattern translates to a 500,000 rank. And a High severity pattern translates to a 250,000 rank. Rank values less than 1 or greater than 1,000,000 are reserved for Amazon Web Services provided patterns.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateLogPattern(
        pattern: String? = nil,
        patternName: String,
        patternSetName: String,
        rank: Int? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateLogPatternResponse {
        let input = UpdateLogPatternRequest(
            pattern: pattern, 
            patternName: patternName, 
            patternSetName: patternSetName, 
            rank: rank, 
            resourceGroupName: resourceGroupName
        )
        return try await self.updateLogPattern(input, logger: logger)
    }

    /// Updates the visibility of the problem or specifies the problem as RESOLVED.
    @Sendable
    @inlinable
    public func updateProblem(_ input: UpdateProblemRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateProblemResponse {
        try await self.client.execute(
            operation: "UpdateProblem", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the visibility of the problem or specifies the problem as RESOLVED.
    ///
    /// Parameters:
    ///   - problemId: The ID of the problem.
    ///   - updateStatus: The status of the problem. Arguments can be passed for only problems that show a status of RECOVERING.
    ///   - visibility: The visibility of a problem. When you pass a value of IGNORED, the problem is removed from the default view, and all notifications for the problem are suspended. When VISIBLE is passed, the IGNORED action is reversed.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateProblem(
        problemId: String,
        updateStatus: UpdateStatus? = nil,
        visibility: Visibility? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateProblemResponse {
        let input = UpdateProblemRequest(
            problemId: problemId, 
            updateStatus: updateStatus, 
            visibility: visibility
        )
        return try await self.updateProblem(input, logger: logger)
    }

    /// Adds a workload to a component. Each component can have at most five workloads.
    @Sendable
    @inlinable
    public func updateWorkload(_ input: UpdateWorkloadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateWorkloadResponse {
        try await self.client.execute(
            operation: "UpdateWorkload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a workload to a component. Each component can have at most five workloads.
    ///
    /// Parameters:
    ///   - componentName:  The name of the component.
    ///   - resourceGroupName: The name of the resource group.
    ///   - workloadConfiguration: The configuration settings of the workload. The value is the escaped JSON of the configuration.
    ///   - workloadId: The ID of the workload.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateWorkload(
        componentName: String,
        resourceGroupName: String,
        workloadConfiguration: WorkloadConfiguration,
        workloadId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateWorkloadResponse {
        let input = UpdateWorkloadRequest(
            componentName: componentName, 
            resourceGroupName: resourceGroupName, 
            workloadConfiguration: workloadConfiguration, 
            workloadId: workloadId
        )
        return try await self.updateWorkload(input, logger: logger)
    }
}

extension ApplicationInsights {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: ApplicationInsights, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ApplicationInsights {
    /// Return PaginatorSequence for operation ``listApplications(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationsPaginator(
        _ input: ListApplicationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationsRequest, ListApplicationsResponse> {
        return .init(
            input: input,
            command: self.listApplications,
            inputKey: \ListApplicationsRequest.nextToken,
            outputKey: \ListApplicationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplications(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationsPaginator(
        accountId: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationsRequest, ListApplicationsResponse> {
        let input = ListApplicationsRequest(
            accountId: accountId, 
            maxResults: maxResults
        )
        return self.listApplicationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentsPaginator(
        _ input: ListComponentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListComponentsRequest, ListComponentsResponse> {
        return .init(
            input: input,
            command: self.listComponents,
            inputKey: \ListComponentsRequest.nextToken,
            outputKey: \ListComponentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentsPaginator(
        accountId: String? = nil,
        maxResults: Int? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListComponentsRequest, ListComponentsResponse> {
        let input = ListComponentsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            resourceGroupName: resourceGroupName
        )
        return self.listComponentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listConfigurationHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listConfigurationHistoryPaginator(
        _ input: ListConfigurationHistoryRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListConfigurationHistoryRequest, ListConfigurationHistoryResponse> {
        return .init(
            input: input,
            command: self.listConfigurationHistory,
            inputKey: \ListConfigurationHistoryRequest.nextToken,
            outputKey: \ListConfigurationHistoryResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listConfigurationHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - endTime: The end time of the event.
    ///   - eventStatus: The status of the configuration update event. Possible values include INFO, WARN, and ERROR.
    ///   - maxResults:  The maximum number of results returned by ListConfigurationHistory in paginated output. When this parameter is used, ListConfigurationHistory returns only MaxResults in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another ListConfigurationHistory request with the returned NextToken value. If this parameter is not used, then ListConfigurationHistory returns all results.
    ///   - resourceGroupName: Resource group to which the application belongs.
    ///   - startTime: The start time of the event.
    ///   - logger: Logger used for logging
    @inlinable
    public func listConfigurationHistoryPaginator(
        accountId: String? = nil,
        endTime: Date? = nil,
        eventStatus: ConfigurationEventStatus? = nil,
        maxResults: Int? = nil,
        resourceGroupName: String? = nil,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListConfigurationHistoryRequest, ListConfigurationHistoryResponse> {
        let input = ListConfigurationHistoryRequest(
            accountId: accountId, 
            endTime: endTime, 
            eventStatus: eventStatus, 
            maxResults: maxResults, 
            resourceGroupName: resourceGroupName, 
            startTime: startTime
        )
        return self.listConfigurationHistoryPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listLogPatternSets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogPatternSetsPaginator(
        _ input: ListLogPatternSetsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListLogPatternSetsRequest, ListLogPatternSetsResponse> {
        return .init(
            input: input,
            command: self.listLogPatternSets,
            inputKey: \ListLogPatternSetsRequest.nextToken,
            outputKey: \ListLogPatternSetsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listLogPatternSets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogPatternSetsPaginator(
        accountId: String? = nil,
        maxResults: Int? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListLogPatternSetsRequest, ListLogPatternSetsResponse> {
        let input = ListLogPatternSetsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            resourceGroupName: resourceGroupName
        )
        return self.listLogPatternSetsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listLogPatterns(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogPatternsPaginator(
        _ input: ListLogPatternsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListLogPatternsRequest, ListLogPatternsResponse> {
        return .init(
            input: input,
            command: self.listLogPatterns,
            inputKey: \ListLogPatternsRequest.nextToken,
            outputKey: \ListLogPatternsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listLogPatterns(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - patternSetName: The name of the log pattern set.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogPatternsPaginator(
        accountId: String? = nil,
        maxResults: Int? = nil,
        patternSetName: String? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListLogPatternsRequest, ListLogPatternsResponse> {
        let input = ListLogPatternsRequest(
            accountId: accountId, 
            maxResults: maxResults, 
            patternSetName: patternSetName, 
            resourceGroupName: resourceGroupName
        )
        return self.listLogPatternsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProblems(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProblemsPaginator(
        _ input: ListProblemsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProblemsRequest, ListProblemsResponse> {
        return .init(
            input: input,
            command: self.listProblems,
            inputKey: \ListProblemsRequest.nextToken,
            outputKey: \ListProblemsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProblems(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID for the resource group owner.
    ///   - componentName:  The name of the component.
    ///   - endTime: The time when the problem ended, in epoch seconds. If not specified, problems within the past seven days are returned.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - resourceGroupName: The name of the resource group.
    ///   - startTime: The time when the problem was detected, in epoch seconds. If you don't specify a time frame for the request, problems within the past seven days are returned.
    ///   - visibility: Specifies whether or not you can view the problem. If not specified, visible and ignored problems are returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProblemsPaginator(
        accountId: String? = nil,
        componentName: String? = nil,
        endTime: Date? = nil,
        maxResults: Int? = nil,
        resourceGroupName: String? = nil,
        startTime: Date? = nil,
        visibility: Visibility? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProblemsRequest, ListProblemsResponse> {
        let input = ListProblemsRequest(
            accountId: accountId, 
            componentName: componentName, 
            endTime: endTime, 
            maxResults: maxResults, 
            resourceGroupName: resourceGroupName, 
            startTime: startTime, 
            visibility: visibility
        )
        return self.listProblemsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listWorkloads(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listWorkloadsPaginator(
        _ input: ListWorkloadsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListWorkloadsRequest, ListWorkloadsResponse> {
        return .init(
            input: input,
            command: self.listWorkloads,
            inputKey: \ListWorkloadsRequest.nextToken,
            outputKey: \ListWorkloadsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listWorkloads(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accountId: The Amazon Web Services account ID of the owner of the workload.
    ///   - componentName: The name of the component.
    ///   - maxResults: The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
    ///   - resourceGroupName: The name of the resource group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listWorkloadsPaginator(
        accountId: String? = nil,
        componentName: String,
        maxResults: Int? = nil,
        resourceGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListWorkloadsRequest, ListWorkloadsResponse> {
        let input = ListWorkloadsRequest(
            accountId: accountId, 
            componentName: componentName, 
            maxResults: maxResults, 
            resourceGroupName: resourceGroupName
        )
        return self.listWorkloadsPaginator(input, logger: logger)
    }
}

extension ApplicationInsights.ListApplicationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListApplicationsRequest {
        return .init(
            accountId: self.accountId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ApplicationInsights.ListComponentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListComponentsRequest {
        return .init(
            accountId: self.accountId,
            maxResults: self.maxResults,
            nextToken: token,
            resourceGroupName: self.resourceGroupName
        )
    }
}

extension ApplicationInsights.ListConfigurationHistoryRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListConfigurationHistoryRequest {
        return .init(
            accountId: self.accountId,
            endTime: self.endTime,
            eventStatus: self.eventStatus,
            maxResults: self.maxResults,
            nextToken: token,
            resourceGroupName: self.resourceGroupName,
            startTime: self.startTime
        )
    }
}

extension ApplicationInsights.ListLogPatternSetsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListLogPatternSetsRequest {
        return .init(
            accountId: self.accountId,
            maxResults: self.maxResults,
            nextToken: token,
            resourceGroupName: self.resourceGroupName
        )
    }
}

extension ApplicationInsights.ListLogPatternsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListLogPatternsRequest {
        return .init(
            accountId: self.accountId,
            maxResults: self.maxResults,
            nextToken: token,
            patternSetName: self.patternSetName,
            resourceGroupName: self.resourceGroupName
        )
    }
}

extension ApplicationInsights.ListProblemsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListProblemsRequest {
        return .init(
            accountId: self.accountId,
            componentName: self.componentName,
            endTime: self.endTime,
            maxResults: self.maxResults,
            nextToken: token,
            resourceGroupName: self.resourceGroupName,
            startTime: self.startTime,
            visibility: self.visibility
        )
    }
}

extension ApplicationInsights.ListWorkloadsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ApplicationInsights.ListWorkloadsRequest {
        return .init(
            accountId: self.accountId,
            componentName: self.componentName,
            maxResults: self.maxResults,
            nextToken: token,
            resourceGroupName: self.resourceGroupName
        )
    }
}
